package com.socodethis.spaceex;


import com.badlogic.gdx.Audio;
import com.badlogic.gdx.assets.AssetManager;
import com.badlogic.gdx.audio.Music;
import com.badlogic.gdx.audio.Sound;
import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.g2d.BitmapFont;

public class Assets {
	
	//Asset Manager
	public static AssetManager manager ;
	
	//load all the required assets at start
	public static void load() {
		//This gets rid of the "Power of 2 error". Slightly affects performance.
		Texture.setEnforcePotImages(false);
		//tiledLoader map = new tiledLoader("data/badMap.tmx", "data/");
		manager = new AssetManager();
		
		//graphics
		manager.load("spongebob.png",Texture.class);
		manager.load("sprite_select.png",Texture.class);
		manager.load("sprite_man.png",Texture.class);
		manager.load("player_attacks/hbar_inner.png",Texture.class);
		manager.load("player_attacks/hbar_outer.png",Texture.class);
		manager.load("player_attacks/fireball.png",Texture.class);
		manager.load("data/level_1_tiles.png",Texture.class);
		manager.load("btnPlay.png",Texture.class);
		manager.load("btnExit.png",Texture.class);
		manager.load("astrocat_logo.png",Texture.class);
		manager.load("socodeit.png",Texture.class);
		manager.load("mediumPlanet9.png",Texture.class);
		manager.load("smallPlanet9.png",Texture.class);
		manager.load("test_stars1.png",Texture.class);
		manager.load("test_stars2.png",Texture.class);
		manager.load("player_move/player_ld1.png",Texture.class);
		manager.load("player_move/player_ld2.png",Texture.class);
		manager.load("player_move/player_ld3.png",Texture.class);
		manager.load("player_move/player_ld4.png",Texture.class);
		manager.load("player_move/player_lu1.png",Texture.class);
		manager.load("player_move/player_lu2.png",Texture.class);
		manager.load("player_move/player_lu3.png",Texture.class);
		manager.load("player_move/player_lu4.png",Texture.class);
		manager.load("player_move/player_rd1.png",Texture.class);
		manager.load("player_move/player_rd2.png",Texture.class);
		manager.load("player_move/player_rd3.png",Texture.class);
		manager.load("player_move/player_rd4.png",Texture.class);
		manager.load("player_move/player_ru1.png",Texture.class);
		manager.load("player_move/player_ru2.png",Texture.class);
		manager.load("player_move/player_ru3.png",Texture.class);
		manager.load("player_move/player_ru4.png",Texture.class);
		
		manager.load("player_move/catani_ld1.png",Texture.class);
		manager.load("player_move/catani_ld2.png",Texture.class);
		manager.load("player_move/catani_ld3.png",Texture.class);
		manager.load("player_move/catani_lu1.png",Texture.class);
		manager.load("player_move/catani_lu2.png",Texture.class);
		manager.load("player_move/catani_lu3.png",Texture.class);
		manager.load("player_move/catani_rd1.png",Texture.class);
		manager.load("player_move/catani_rd2.png",Texture.class);
		manager.load("player_move/catani_rd3.png",Texture.class);
		manager.load("player_move/catani_ru1.png",Texture.class);
		manager.load("player_move/catani_ru2.png",Texture.class);
		manager.load("player_move/catani_ru3.png",Texture.class);
		
		
		manager.load("structures/structure_test.png",Texture.class);
		manager.load("structures/structure_test2.png",Texture.class);
		manager.load("structures/structure_test3.png",Texture.class);
		manager.load("structures/structure_test4.png",Texture.class);
		manager.load("structures/structure_doorO.png",Texture.class);
		manager.load("structures/structure_doorC.png",Texture.class);
		manager.load("structures/structure_buttonOn.png",Texture.class);
		manager.load("structures/structure_buttonOff.png",Texture.class);
		manager.load("test_skybox.png",Texture.class);
		//Sound effects use the sound class
		manager.load("sounds/sfx_cat_walk_gravel.ogg",Sound.class);
		manager.load("sounds/sfx_cat_walk.ogg",Sound.class);
		manager.load("sounds/sfx_cat_attack_basic.ogg",Sound.class);
		//Background music uses music
		manager.load("sounds/theme_evening_star.mp3",Music.class);
		manager.load("sounds/blasting_off_again.mp3",Music.class);
		//fonts
		manager.load("data/font1.fnt",BitmapFont.class);
		
		
		manager.finishLoading();
	}
	
	/**
	 * Clean up and dispose of all of the loaded assets
	 */
	public static void dispose() {
		manager.dispose();
	}

}